<!DOCTYPE HTML>  
<html>
<head>
<meta charset="utf-8">
<title>savenote</title>
</head>

<body>



<cfset paramid    = form.argcurrentid />          

<cfset myArr = ArrayNew(1)>

<cfset myArr = ListToArray( paramid , "~", "true") />

<cfset foldercode = Trim(myArr[1])>
<cfset notesid    = Trim(myArr[2])>

	<cfquery name="getCollabid" datasource="#client.company_dsn#">
    
       SELECT COLLABCODE
       	 FROM ECRGCOLLABTHREAD
         WHERE FOLDERCODE = '#foldercode#';
       
    </cfquery>
       <cfloop query="getCollabid">
            <cfquery name="DELETEshared" datasource="#client.company_dsn#">
            
               DELETE FROM ECRTCOLLAB
                WHERE COLLABCODE  = '#getCollabid.collabcode#';
            
            </cfquery>
       </cfloop>

	<cfquery name="updateNote" datasource="#client.company_dsn#">
    	DELETE FROM ECRGCOLLABTHREAD
         WHERE FOLDERCODE = '#foldercode#';
    </cfquery>
    
    <cfquery name="updateNote" datasource="#client.company_dsn#">
    	DELETE FROM ECRGCOLLAB
         WHERE USERID         = '#client.USERID#'
           AND FOLDERCODE = '#foldercode#';
    </cfquery>

    



</body>
</html>
